﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Wpf_Test1
{
    /// <summary>
    /// LoginlibraryDemo.xaml 的交互逻辑
    /// </summary>
    public partial class LoginlibraryDemo : Window
    {
        //Login login;
        Class2 class2;
        public LoginlibraryDemo()
        {
            InitializeComponent();
            class2=new Class2(this);
            //login=new Login();
            //login.UserName = "777";
            //login.Password = "789";
        
        }
        //属性按钮绑定
        //private void Button_Click(object sender, RoutedEventArgs e)
        //{

        //    //string username = Account.Text;
        //    //string pwd = Pwd.Text;

        //    if (class2.UserName == "123" && class2.Password == "456")
        //    {
        //        MessageBox.Show("登录成功");
        //        //实例化
        //        Index index = new Index();
        //        index.Show();
        //        this.Close();
        //    }
        //    else
        //    {
        //        MessageBox.Show("账号密码错误");
        //        class2.UserName = "";
        //        class2.Password = "";
           
        //    }
        //}


    }
    //public class Login : INotifyPropertyChanged
    //{
    //    //可以让文本狂自动为空数据
    //    public event PropertyChangedEventHandler PropertyChanged;
    //    private void RaisePropertyChanged(string propertyname)
    //    {
    //        PropertyChangedEventHandler handler = PropertyChanged;
    //        if (handler != null)
    //        {
    //            handler(this, new PropertyChangedEventArgs(propertyname));
    //        }
    //    }



    
}
